<?php
require_once "db.php";
session_start();

$genre1 = db_escape($_POST['genre1']);
$genre2 = db_escape($_POST['genre2']);
$genre3 = db_escape($_POST['genre3']);
$userid = $_SESSION['uid'];

$change_genres_query_text = "UPDATE accounts SET favgenre1 = '$genre1', favgenre2 = '$genre2',favgenre3 = '$genre3' WHERE idaccounts='$userid'";
$change_genres_query = db_query($change_genres_query_text);

echo "Your favourite genres were changed.";


